package day05;
import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;

import java.util.Arrays;
public class ArrayDemo5 {
    public static void main(String[] args) {
        int[] a = {10, 20, 30, 40, 50};
        int[] b = Arrays.copyOf(a, 4);
        for (int i = 0; i < b.length; i++)
        {
            System.out.println(b[i]);
        }
        System.out.println("---------------");
        //扩容数组
        a=Arrays.copyOf(a,a.length+1);
        for(int i=0;i<a.length;i++){
            System.out.print(a[i]+"\t");
        }


    }
}

